/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.hotelbooking.app.factory;

import ac.za.cput.hotelbooking.model.*;
import java.math.BigDecimal;

/**
 *
 * @author Sakhe
 */
public class AppFactory {
    
   public static Demographics getDmograpgics(String race, String gender)
   {
       Demographics demographcs = new Demographics();
       demographcs.setGender(gender);
       demographcs.setRace(race);
       return demographcs;
   }
   
   public static GuestName getGuestName(String name,String surname,String id,String contact)
   {
       GuestName guestName = new GuestName();
       guestName.setContactNumber(contact);
       guestName.setFname(name);
       guestName.setLname(surname);
       guestName.setIDnumber(id);
       return guestName;
   }
   
   public static GuestAddress getGuestAddress(String street, String postalAddrss, int houseNumber)
   {
       GuestAddress guestAddress = new GuestAddress();
       guestAddress.setPostalAdress(postalAddrss);
       guestAddress.setStreetAddress(street);
       return guestAddress;
   }
   
   public static Payment getPayment(String paymentid,String descrption, double balance)
   {
       Payment payment = new Payment();
       payment.setBalance(new BigDecimal(balance));
       payment.setDescription(descrption);
       payment.setPaymentId(paymentid);
       return payment;
   }

    public static Guest createGuest(Demographics demographics, GuestName guestName, GuestAddress guestAddress, long paymentId) {
        Guest guest = new Guest();
        guest.setDemographics(demographics);
        guest.setGuestAddress(guestAddress);
        guest.setGuestName(guestName);
        return guest;
    }
}
